FROM jenkins/jenkins:lts-jdk11
MAINTAINER xuwenfeng

USER root
RUN echo "Asia/Shanghai" > /etc/timezone
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash;
ENV NVM_NODEJS_ORG_MIRROR https://npm.taobao.org/dist

#此镜像可以在容器中调用宿主机的docker命令
#sudo docker build -t='registry.cn-hangzhou.aliyuncs.com/bewithmeallmylife/jenkins:jdk11-nvm-did' .

#sudo docker run  --privileged -v /var/run/docker.sock:/var/run/docker.sock  --net=host  -it bewithmeallmylife/openjdk:11-jdk-alpine-docker-in-docker /bin/sh

#docker run -itd   --name jenkins -p 8080:8080 -p 50000:50000 -v /home/ngi/jenkins_home:/var/jenkins_home -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -u 0  registry.cn-hangzhou.aliyuncs.com/bewithmeallmylife/jenkins:jdk11-nvm-did